package svc

import (
	"game/api/internal/config"
	"game/rpc/gamerpc/gamerpc"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	GameRpc gamerpc.GameRpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		GameRpc: gamerpc.NewGameRpc(zrpc.MustNewClient(c.GameRpc))}
}
